import {
  defineConfig,
  presetIcons,
  transformerDirectives,
  transformerVariantGroup,
} from 'unocss'

import { presetUni } from '@uni-helper/unocss-preset-uni'

export default defineConfig({
  rules: [
    ['x-center', { left: '50%', transform: 'translateX(-50%)' }],
    ['text-brand', { color: '#FF6D0A' }],
    ['bg-brand', { 'background-color': '#FF6D0A' }],
    ['text-primary', { color: '#000000' }],
    ['text-secondary', { color: '#333333' }],
    ['text-tertiary', { color: '#999999' }],
    ['rounded-large', { 'border-radius': '20rpx' }],
    ['rounded-small', { 'border-radius': '10rpx' }]
  ],
  presets: [
    presetUni(),
    presetIcons({
      scale: 1.2,
      warn: true,
      extraProperties: {
        'display': 'inline-block',
        'vertical-align': 'middle',
      },
    }),
  ],
  transformers: [
    transformerDirectives(),
    transformerVariantGroup(),
  ],
})
